#!/usr/bin/env python
# -*- coding: UTF-8 -*-
# @Project : chat_model 
# @File    : schema.py
# @IDE     : PyCharm 
# @Author  :ZH
# @Time    : 2025/1/4 16:25
from datetime import datetime

from pydantic import BaseModel
from typing import Optional, List


class VideoModelListResponseBase(BaseModel):
    id: Optional[int]
    update_date: Optional[datetime]
    model_name: Optional[str]
    firm: Optional[int]
    description: Optional[str]


class VideoModelListResponse(BaseModel):
    code: int
    message: str
    count: int
    data: Optional[List[VideoModelListResponseBase]]


class VideoModelListQuery(BaseModel):
    page: Optional[int] = 1
    limit: Optional[int] = 10
    name: Optional[str] = None


class VideoSessionCreate(BaseModel):
    session_name: Optional[str] = '新建剪辑室'
    model_id: Optional[int]
    description: Optional[str]


class VideoSessionListQuery(BaseModel):
    page: Optional[int] = 1
    limit: Optional[int] = 10
    name: Optional[str] = None


class VideoSessionResponseBase(BaseModel):
    id: Optional[int]
    session_name: Optional[str]
    model_id: Optional[int]
    description: Optional[str]
    update_date: Optional[datetime]


class VideoSessionResponse(BaseModel):
    code: int
    message: str
    data: Optional[VideoSessionResponseBase]


class VideoDialogueListQuery(BaseModel):
    session_id: int
    page: Optional[int] = 1
    limit: Optional[int] = 10


class VideoDialogueListResponseBase(BaseModel):
    id: Optional[int]
    query: Optional[str]
    answer: Optional[str]
    model_name: Optional[str]


class VideoDialogueListResponse(BaseModel):
    code: int
    message: str
    count: Optional[int]
    data: Optional[List[VideoDialogueListResponseBase]]


class VideoQuery(BaseModel):
    session_id: Optional[int]
    query: Optional[str]
    image_url: Optional[str]


class VideoResponseBase(BaseModel):
    session_id: Optional[int]
    answer: Optional[str]


class VideoResponse(BaseModel):
    code: int
    message: str
    data: Optional[VideoResponseBase]


class DefaultVideoResponse(BaseModel):
    code: int
    message: str
